-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add auto-instrumentation for compose navigation #392
Conversation
...ld/src/main/kotlin/io/sentry/android/gradle/instrumentation/SpanAddingClassVisitorFactory.kt
Outdated
Show resolved
Hide resolved
.compose.NavHostControllerKt contains an extension function for .NavHostController class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, great job 👍 Left some comments
Also, some tests are failing, probably needs adaptation after changing to a single ChainedInstrumentable.
Plus, we should also test auto-install stuff (unit + integration), you can check https://github.com/getsentry/sentry-android-gradle-plugin/blob/main/plugin-build/src/test/kotlin/io/sentry/android/gradle/SentryPluginAutoInstallTest.kt for the integration part
plugin-build/src/main/kotlin/io/sentry/android/gradle/util/Versions.kt
Outdated
Show resolved
Hide resolved
...c/main/kotlin/io/sentry/android/gradle/instrumentation/androidx/compose/ComposeNavigation.kt
Outdated
Show resolved
Hide resolved
plugin-build/src/main/kotlin/io/sentry/android/gradle/util/Versions.kt
Outdated
Show resolved
Hide resolved
Replace testRuntimeOnly with testImplementationAar as otherwise the Gradle sync fails with the following error: - Incompatible because this component declares an API of a component, with the library elements 'aar' and the consumer needed a runtime of a component, packaged as a jar
E.g. the compose integration requires both a specific androidx runtime version as well as sentry SDK version
📜 Description
Modifies the androidx
rememberNavController
method to automatically report navigation events to sentry.💡 Motivation and Context
Related issue: getsentry/sentry-java#2319
Requires getsentry/sentry-java#2320 to be merged and released first.
💚 How did you test it?
For now just manually.
📝 Checklist
🔮 Next steps